import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '类别',
    align:"center",
    dataIndex: 'typeId_dictText'
   },
   {
    title: '拼包车/其它',
    align:"center",
    dataIndex: 'carpoolBus_dictText'
   },
   {
    title: '订单',
    align:"center",
    sorter: true,
    dataIndex: 'orderNum'
   },
   {
    title: '支付商品件数',
    align:"center",
    sorter: true,
    dataIndex: 'pdtNum'
   },
   {
    title: '订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'orderPrice'
   },
   {
    title: '已支付订单',
    align:"center",
    sorter: true,
    dataIndex: 'payOrderNum'
   },
   {
    title: '待支付订单',
    align:"center",
    sorter: true,
    dataIndex: 'stayPayOrderNum'
   },
   {
    title: '待支付订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'stayOrderPrice'
   },
   {
    title: '退款订单',
    align:"center",
    sorter: true,
    dataIndex: 'refundOrderNum'
   },
   {
    title: '成交客户数',
    align:"center",
    sorter: true,
    dataIndex: 'clientNum'
   },
   {
    title: '老客户成交数',
    align:"center",
    sorter: true,
    dataIndex: 'agedClientNum'
   },
   {
    title: '老客订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'agedClientOrderPrice'
   },
   {
    title: '新客成交数',
    align:"center",
    sorter: true,
    dataIndex: 'newClientNum'
   },
   {
    title: '新客订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'newClientOrderPrice'
   },
   {
    title: '退款金额',
    align:"center",
    sorter: true,
    dataIndex: 'refundPrice'
   },
   {
    title: '核销订单',
    align:"center",
    sorter: true,
    dataIndex: 'chargeOffNum'
   },
   {
    title: '核销订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'chargeOffPrice'
   },
   {
    title: '未核销订单',
    align:"center",
    sorter: true,
    dataIndex: 'weiChargeOffOrderNum'
   },
   {
    title: '未核销订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'weiChargeOffPrice'
   },
   {
    title: '过期未核销订单',
    align:"center",
    sorter: true,
    dataIndex: 'timeoutOrderNum'
   },
   {
    title: '过期未核销订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'timeoutOrderPrice'
   },
   {
    title: '转让行程订单',
    align:"center",
    sorter: true,
    dataIndex: 'transfeOrderNum'
   },
   {
    title: '转让行程订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'transfeOrderPrice'
   },
   {
    title: '转让行程订单手续费',
    align:"center",
    sorter: true,
    dataIndex: 'transfeOrderPriceFee'
   },
   {
    title: '转出订单',
    align:"center",
    sorter: true,
    dataIndex: 'coupleToOtherShopNum'
   },
   {
    title: '转出订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'coupleToOtherOrderPrice'
   },
   {
    title: '转入订单',
    align:"center",
    dataIndex: 'otherShopToCoupleNum'
   },
   {
    title: '转出订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'otherShopToCoupleOrderPrice'
   },
   {
    title: '分销商订单',
    align:"center",
    sorter: true,
    dataIndex: 'agentOrderNum'
   },
   {
    title: '分销商订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'agentOrderPrice'
   },
   {
    title: '商家/景点',
    align:"center",
    dataIndex: 'shopId_dictText'
   },
   {
    title: '城市',
    align:"center",
    dataIndex: 'cityId_dictText'
   },
   {
    title: '租户',
    align:"center",
    dataIndex: 'tenantId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "类别",
      field: "typeId",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"statistice_order_type"
      },
      //colProps: {span: 6},
 	},
	{
      label: "拼包车/其它",
      field: "carpoolBus",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"statistice_order_pdt_type"
      },
      //colProps: {span: 6},
 	},
	{
      label: "商家/景点",
      field: "shopId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"couple_shop,title,id"
      },
      //colProps: {span: 6},
 	},
	{
      label: "城市",
      field: "cityId",
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "租户",
      field: "tenantId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"sys_tenant,name,id"
      },
      //colProps: {span: 6},
 	},
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '类别',
    field: 'typeId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"statistice_order_type"
     },
  },
  {
    label: '拼包车/其它',
    field: 'carpoolBus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"statistice_order_pdt_type"
     },
  },
  {
    label: '订单',
    field: 'orderNum',
    component: 'InputNumber',
  },
  {
    label: '支付商品件数',
    field: 'pdtNum',
    component: 'InputNumber',
  },
  {
    label: '订单金额',
    field: 'orderPrice',
    component: 'InputNumber',
  },
  {
    label: '已支付订单',
    field: 'payOrderNum',
    component: 'InputNumber',
  },
  {
    label: '待支付订单',
    field: 'stayPayOrderNum',
    component: 'InputNumber',
  },
  {
    label: '待支付订单金额',
    field: 'stayOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '退款订单',
    field: 'refundOrderNum',
    component: 'InputNumber',
  },
  {
    label: '成交客户数',
    field: 'clientNum',
    component: 'InputNumber',
  },
  {
    label: '老客户成交数',
    field: 'agedClientNum',
    component: 'InputNumber',
  },
  {
    label: '老客订单金额',
    field: 'agedClientOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '新客成交数',
    field: 'newClientNum',
    component: 'InputNumber',
  },
  {
    label: '新客订单金额',
    field: 'newClientOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '退款金额',
    field: 'refundPrice',
    component: 'InputNumber',
  },
  {
    label: '核销订单',
    field: 'chargeOffNum',
    component: 'InputNumber',
  },
  {
    label: '核销订单金额',
    field: 'chargeOffPrice',
    component: 'InputNumber',
  },
  {
    label: '未核销订单',
    field: 'weiChargeOffOrderNum',
    component: 'InputNumber',
  },
  {
    label: '未核销订单金额',
    field: 'weiChargeOffPrice',
    component: 'InputNumber',
  },
  {
    label: '过期未核销订单',
    field: 'timeoutOrderNum',
    component: 'InputNumber',
  },
  {
    label: '过期未核销订单金额',
    field: 'timeoutOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '转让行程订单',
    field: 'transfeOrderNum',
    component: 'InputNumber',
  },
  {
    label: '转让行程订单金额',
    field: 'transfeOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '转让行程订单手续费',
    field: 'transfeOrderPriceFee',
    component: 'InputNumber',
  },
  {
    label: '转出订单',
    field: 'coupleToOtherShopNum',
    component: 'InputNumber',
  },
  {
    label: '转出订单金额',
    field: 'coupleToOtherOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '转入订单',
    field: 'otherShopToCoupleNum',
    component: 'InputNumber',
  },
  {
    label: '转出订单金额',
    field: 'otherShopToCoupleOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '分销商订单',
    field: 'agentOrderNum',
    component: 'InputNumber',
  },
  {
    label: '分销商订单金额',
    field: 'agentOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '商家/景点',
    field: 'shopId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"couple_shop,title,id"
    },
  },
  {
    label: '城市',
    field: 'cityId',
    component: 'JTreeSelect',
    componentProps:{
        pidValue:"id",
    },
  },
  {
    label: '租户',
    field: 'tenantId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"sys_tenant,name,id"
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

//子表列表数据
export const coupleStatisticsOrderDayColumns: BasicColumn[] = [
   {
    title: '类别',
    align:"center",
    dataIndex: 'typeId_dictText'
   },
   {
    title: '拼包车/其它',
    align:"center",
    dataIndex: 'carpoolBus_dictText'
   },
   {
    title: '订单',
    align:"center",
    sorter: true,
    dataIndex: 'orderNum'
   },
   {
    title: '支付商品件数',
    align:"center",
    sorter: true,
    dataIndex: 'pdtNum'
   },
   {
    title: '订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'orderPrice'
   },
   {
    title: '已支付订单',
    align:"center",
    sorter: true,
    dataIndex: 'payOrderNum'
   },
   {
    title: '待支付订单',
    align:"center",
    sorter: true,
    dataIndex: 'stayPayOrderNum'
   },
   {
    title: '待支付订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'stayOrderPrice'
   },
   {
    title: '退款订单',
    align:"center",
    sorter: true,
    dataIndex: 'refundOrderNum'
   },
   {
    title: '退款金额',
    align:"center",
    sorter: true,
    dataIndex: 'refundPrice'
   },
   {
    title: '成交客户数',
    align:"center",
    sorter: true,
    dataIndex: 'clientNum'
   },
   {
    title: '老客户成交数',
    align:"center",
    sorter: true,
    dataIndex: 'agedClientNum'
   },
   {
    title: '老客订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'agedClientOrderPrice'
   },
   {
    title: '新客成交数',
    align:"center",
    sorter: true,
    dataIndex: 'newClientNum'
   },
   {
    title: '新客订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'newClientOrderPrice'
   },
   {
    title: '核销订单',
    align:"center",
    sorter: true,
    dataIndex: 'chargeOffNum'
   },
   {
    title: '核销订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'chargeOffPrice'
   },
   {
    title: '未核销订单',
    align:"center",
    sorter: true,
    dataIndex: 'weiChargeOffOrderNum'
   },
   {
    title: '未核销订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'weiChargeOffPrice'
   },
   {
    title: '过期未核销订单',
    align:"center",
    sorter: true,
    dataIndex: 'timeoutOrderNum'
   },
   {
    title: '过期未核销订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'timeoutOrderPrice'
   },
   {
    title: '客单价',
    align:"center",
    sorter: true,
    dataIndex: 'oneOrderPrice'
   },
   {
    title: '转让行程订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'transfeOrderPrice'
   },
   {
    title: '转让行程订单手续费',
    align:"center",
    sorter: true,
    dataIndex: 'transfeOrderPriceFee'
   },
   {
    title: '转出订单',
    align:"center",
    sorter: true,
    dataIndex: 'coupleToOtherShopNum'
   },
   {
    title: '转出订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'coupleToOtherOrderPrice'
   },
   {
    title: '转入订单',
    align:"center",
    sorter: true,
    dataIndex: 'otherShopToCoupleNum'
   },
   {
    title: '转出订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'otherShopToCoupleOrderPrice'
   },
   {
    title: '分销商订单',
    align:"center",
    sorter: true,
    dataIndex: 'agentOrderNum'
   },
   {
    title: '分销商订单金额',
    align:"center",
    sorter: true,
    dataIndex: 'agentOrderPrice'
   },
   {
    title: '商家/景点',
    align:"center",
    dataIndex: 'shopId_dictText'
   },
   {
    title: '日期',
    align:"center",
    dataIndex: 'day'
   },
   {
    title: '城市',
    align:"center",
    dataIndex: 'cityId_dictText'
   },
   {
    title: '租户',
    align:"center",
    dataIndex: 'tenantId_dictText'
   },
];
//子表表单数据
export const coupleStatisticsOrderDayFormSchema: FormSchema[] = [
  // TODO 子表隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
  {
    label: '类别',
    field: 'typeId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: '拼包车/其它',
    field: 'carpoolBus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"statistice_order_pdt_type"
     },
  },
  {
    label: '订单',
    field: 'orderNum',
    component: 'InputNumber',
  },
  {
    label: '支付商品件数',
    field: 'pdtNum',
    component: 'InputNumber',
  },
  {
    label: '订单金额',
    field: 'orderPrice',
    component: 'InputNumber',
  },
  {
    label: '已支付订单',
    field: 'payOrderNum',
    component: 'InputNumber',
  },
  {
    label: '待支付订单',
    field: 'stayPayOrderNum',
    component: 'InputNumber',
  },
  {
    label: '待支付订单金额',
    field: 'stayOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '退款订单',
    field: 'refundOrderNum',
    component: 'InputNumber',
  },
  {
    label: '退款金额',
    field: 'refundPrice',
    component: 'InputNumber',
  },
  {
    label: '成交客户数',
    field: 'clientNum',
    component: 'InputNumber',
  },
  {
    label: '老客户成交数',
    field: 'agedClientNum',
    component: 'InputNumber',
  },
  {
    label: '老客订单金额',
    field: 'agedClientOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '新客成交数',
    field: 'newClientNum',
    component: 'InputNumber',
  },
  {
    label: '新客订单金额',
    field: 'newClientOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '核销订单',
    field: 'chargeOffNum',
    component: 'InputNumber',
  },
  {
    label: '核销订单金额',
    field: 'chargeOffPrice',
    component: 'InputNumber',
  },
  {
    label: '未核销订单',
    field: 'weiChargeOffOrderNum',
    component: 'InputNumber',
  },
  {
    label: '未核销订单金额',
    field: 'weiChargeOffPrice',
    component: 'InputNumber',
  },
  {
    label: '过期未核销订单',
    field: 'timeoutOrderNum',
    component: 'InputNumber',
  },
  {
    label: '过期未核销订单金额',
    field: 'timeoutOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '客单价',
    field: 'oneOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '转让行程订单金额',
    field: 'transfeOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '转让行程订单手续费',
    field: 'transfeOrderPriceFee',
    component: 'InputNumber',
  },
  {
    label: '转出订单',
    field: 'coupleToOtherShopNum',
    component: 'InputNumber',
  },
  {
    label: '转出订单金额',
    field: 'coupleToOtherOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '转入订单',
    field: 'otherShopToCoupleNum',
    component: 'InputNumber',
  },
  {
    label: '转出订单金额',
    field: 'otherShopToCoupleOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '分销商订单',
    field: 'agentOrderNum',
    component: 'InputNumber',
  },
  {
    label: '分销商订单金额',
    field: 'agentOrderPrice',
    component: 'InputNumber',
  },
  {
    label: '商家/景点',
    field: 'shopId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"couple_shop,title,id"
    },
  },
  {
    label: '城市',
    field: 'cityId',
    component: 'JTreeSelect',
    componentProps:{
        pidValue:"id",
    },
  },
  {
    label: '租户',
    field: 'tenantId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"sys_tenant,name,id"
    },
  },
];
